Joey Hess [Mon, 26 Sep 2022 18:38:34 +0000 (14:38 -0400)]
pass --git-dir when reading git config when it was specified explicitly
Let GIT_DIR and --git-dir override git's protection against operating in a
repository owned by another user.
This is the same behavior other git commands have.
Sponsored-by: Jarkko Kniivilä on Patreon
Joey Hess [Mon, 26 Sep 2022 17:39:10 +0000 (13:39 -0400)]
Revert "fix comment"
This reverts commit
c39b057b2daa3280c045d56d60b2c91a99a9c31b.
Joey Hess [Mon, 26 Sep 2022 17:37:47 +0000 (13:37 -0400)]
fix comment
Joey Hess [Mon, 26 Sep 2022 17:25:04 +0000 (13:25 -0400)]
comment
Joey Hess [Mon, 26 Sep 2022 17:23:04 +0000 (13:23 -0400)]
comment
Joey Hess [Mon, 26 Sep 2022 17:11:23 +0000 (13:11 -0400)]
changelog and close
Joey Hess [Mon, 26 Sep 2022 17:10:47 +0000 (13:10 -0400)]
note that hooks are also run when on a crippled filesystem now
Joey Hess [Mon, 26 Sep 2022 17:10:25 +0000 (13:10 -0400)]
remove unncessary do block
Left by Reiko's patch
Reiko Asakura [Sun, 25 Sep 2022 19:21:24 +0000 (15:21 -0400)]
Run freeze and thaw hooks on crippled filesystems
The user sets these hooks deliberately so they should always be run. For
example this allows hooks to be used to manage file permissions on NTFS
volumes in WSL1.
Joey Hess [Mon, 26 Sep 2022 16:55:51 +0000 (12:55 -0400)]
handle upgrading repositories initialized with --version=9
As was attempted earlier in the buggy commit
0d2e3058ee01d55dc3b929ddf8e0573a95a2ca85
Avoided the bug that had by making the upgrade log be updated after each
upgrade step. So, after upgrade from v8 to v9, the log is updated, and
so Upgrade.V9's timeOfUpgrade check will find that it was upgraded
recently and so won't let it skip ahead to v10.
Sponsored-by: k0ld on Patreon
Joey Hess [Mon, 26 Sep 2022 16:27:32 +0000 (12:27 -0400)]
changelog for problem fixed by earlier revert
Joey Hess [Mon, 26 Sep 2022 16:18:41 +0000 (12:18 -0400)]
comment
Joey Hess [Mon, 26 Sep 2022 16:17:50 +0000 (12:17 -0400)]
Revert "handle upgrading repositories initialized with --version=9"
This reverts commit
0d2e3058ee01d55dc3b929ddf8e0573a95a2ca85.
This commit accidentially caused repos that were initialized at v8 to
also upgrade to v10. There is nothing in the upgrade.log for such a
repo..
Joey Hess [Mon, 26 Sep 2022 16:08:04 +0000 (12:08 -0400)]
fix windows build
Joey Hess [Mon, 26 Sep 2022 16:07:46 +0000 (12:07 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
yarikoptic [Mon, 26 Sep 2022 15:47:23 +0000 (15:47 +0000)]
report on windows FTBFS
Added a comment
Fix some markdown formatting problems
Add patches for WSL1
Fix WSL1 instructions
close bug "git commit smudges unncessarily"
Added a comment
dukeofcool199 [Sat, 24 Sep 2022 19:24:19 +0000 (19:24 +0000)]
dukeofcool199 [Sat, 24 Sep 2022 19:21:09 +0000 (19:21 +0000)]
Joey Hess [Fri, 23 Sep 2022 22:53:06 +0000 (18:53 -0400)]
refector for legibility
Joey Hess [Fri, 23 Sep 2022 20:29:28 +0000 (16:29 -0400)]
restage: New git-annex command, handles restaging unlocked files
This is much easier and less failure-prone than having the user run
git update-index --refresh themselves.
Sponsored-by: Dartmouth College's DANDI project
Joey Hess [Fri, 23 Sep 2022 19:55:40 +0000 (15:55 -0400)]
fix restaging of transferred files after stalldetection kicks in
Sponsored-by: Dartmouth College's DANDI project
Joey Hess [Fri, 23 Sep 2022 18:38:59 +0000 (14:38 -0400)]
add restage log
When pointer files need to be restaged, they're first written to the
log, and then when the restage operation runs, it reads the log. This
way, if the git-annex process is interrupted before it can do the
restaging, a later git-annex process can do it.
Currently, this lets a git-annex get/drop command be interrupted and
then re-ran, and as long as it gets/drops additional files, it will
clean up after the interrupted command. But more changes are
needed to make it easier to restage after an interrupted process.
Kept using the git queue to run the restage action, even though the
list of files that it builds up for that action is not actually used by
the action. This could perhaps be simplified to make restaging a cleanup
action that gets registered, rather than using the git queue for it. But
I wasn't sure if that would cause visible behavior changes, when eg
dropping a large number of files, currently the git queue flushes
periodically, and so it restages incrementally, rather than all at the
end.
In restagePointerFiles, it reads the restage log twice, once to get
the number of files and size, and a second time to process it.
This seemed better than reading the whole file into memory, since
potentially a huge number of files could be in there. Probably the OS
will cache the file in memory and there will not be much performance
impact. It might be better to keep running tallies in another file
though. But updating that atomically with the log seems hard.
Also note that it's possible for calcRestageLog to see a different file
than streamRestageLog does. More files may be added to the log in
between. That is ok, it will only cause the filterprocessfaster heuristic to
operate with slightly out of date information, so it may make the wrong
choice for the files that got added and be a little slower than ideal.
Sponsored-by: Dartmouth College's DANDI project
Joey Hess [Fri, 23 Sep 2022 18:28:52 +0000 (14:28 -0400)]
generalize refreshIndex to MonadIO
Sponsored-by: Dartmouth College's DANDI project
Joey Hess [Fri, 23 Sep 2022 18:01:43 +0000 (14:01 -0400)]
avoid unncessary locking by checkLogFile
Like the comment says, this works without locking. It looks like I
originally copied another function and forgot to remove the locking.
Sponsored-by: Dartmouth College's DANDI project
Joey Hess [Fri, 23 Sep 2022 17:49:01 +0000 (13:49 -0400)]
add a finalizer to streamLogFile
Sponsored-by: Dartmouth College's DANDI project
Joey Hess [Fri, 23 Sep 2022 17:10:49 +0000 (13:10 -0400)]
refactor the restage runner
Sponsored-by: Dartmouth College's DANDI project
Added a comment
Joey Hess [Thu, 22 Sep 2022 19:58:45 +0000 (15:58 -0400)]
test: Added --test-with-git-config option
Sponsored-by: Dartmouth College's DANDI project
Joey Hess [Thu, 22 Sep 2022 18:48:32 +0000 (14:48 -0400)]
comment and todo
Joey Hess [Thu, 22 Sep 2022 18:40:29 +0000 (14:40 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Thu, 22 Sep 2022 18:35:20 +0000 (14:35 -0400)]
drain transferrer read handle when shutting it down
Fixes updating git index file after getting an unlocked file when
annex.stalldetection is set.
The transferrer may want to send additional protocol messages when it's
shut down. Closing the read handle prevented it from doing that, and caused
it to crash rather than cleanly shutting down.
Draining the handle without processing the protocol seemed ok to do,
because anything it outputs is going to be some side message displayed
at shutdown. Displaying those once per transferrer process that is running
seems unncessary.
Sponsored-by: Dartmouth College's DANDI project
yarikoptic [Thu, 22 Sep 2022 18:14:15 +0000 (18:14 +0000)]
Added a comment
Joey Hess [Thu, 22 Sep 2022 18:03:31 +0000 (14:03 -0400)]
comment
Joey Hess [Thu, 22 Sep 2022 17:40:13 +0000 (13:40 -0400)]
comment
Joey Hess [Thu, 22 Sep 2022 17:37:26 +0000 (13:37 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Thu, 22 Sep 2022 17:37:01 +0000 (13:37 -0400)]
correct my comment
yarikoptic [Thu, 22 Sep 2022 17:34:35 +0000 (17:34 +0000)]
Added a comment
Joey Hess [Thu, 22 Sep 2022 17:25:12 +0000 (13:25 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Thu, 22 Sep 2022 17:21:10 +0000 (13:21 -0400)]
reproduced this now
Joey Hess [Thu, 22 Sep 2022 17:21:10 +0000 (13:21 -0400)]
reproduced this now
Joey Hess [Thu, 22 Sep 2022 16:59:53 +0000 (12:59 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Thu, 22 Sep 2022 16:47:40 +0000 (12:47 -0400)]
Improved handling of --time-limit when combined with -J
When concurrency is enabled, there can be worker threads still running
when the time limit is checked. Exiting right there does not
give those threads time to finish what they're doing. Instead, the seeking
is wrapped up, and git-annex then shuts down cleanly.
The whole point of --time-limit existing, rather than using timeout(1)
when running git-annex is to let git-annex finish the action(s) it is
working on when the time limit is reached, and shut down cleanly.
I noticed this problem when investigating why restagePointerFile might
not have run after get/drop of an unlocked file. With --time-limit -J,
a worker thread may have finished updating a work tree file, and be killed
by the time limit check before it can run restagePointerFile. So despite
--time-limit running the shutdown actions, the work tree file didn't get
restaged.
Sponsored-by: Dartmouth College's DANDI project
nobodyinperson [Thu, 22 Sep 2022 06:24:05 +0000 (06:24 +0000)]
Added a comment
removed
jgoerzen [Thu, 22 Sep 2022 03:40:04 +0000 (03:40 +0000)]
Added a comment
yarikoptic [Thu, 22 Sep 2022 01:33:24 +0000 (01:33 +0000)]
Added a comment
yarikoptic [Thu, 22 Sep 2022 01:03:18 +0000 (01:03 +0000)]
Added a comment
Gus [Wed, 21 Sep 2022 22:30:20 +0000 (22:30 +0000)]
Added a comment
Joey Hess [Wed, 21 Sep 2022 22:17:21 +0000 (18:17 -0400)]
comment
Joey Hess [Wed, 21 Sep 2022 20:13:08 +0000 (16:13 -0400)]
wording
Joey Hess [Wed, 21 Sep 2022 20:11:10 +0000 (16:11 -0400)]
comment
Joey Hess [Wed, 21 Sep 2022 19:17:56 +0000 (15:17 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Wed, 21 Sep 2022 19:00:13 +0000 (15:00 -0400)]
annex.diskreserve default increased from 1 mb to 100 mb
It's hard to know what's a good default for this. But 1 mb seems way too
small, because it's very easy for a git pull or some similar operation
that we don't think of as using much space to use up 1 mb of space.
Most people would want to free up some space if a filesystem only had 100
mb free. But on a small VPS, it's probably not uncommon to have only 1 gb
free. So 1 gb is too large for annex.diskreserve.
While old 1 gb USB keys are around, it's unlikely that anyone is
relying on them to shuttle annex data around; it would be worth anyone's
time to upgrade to a 32 gb or larger cheap modern USB key ($5).
Sponsored-by: Kevin Mueller on Patreon
yarikoptic [Wed, 21 Sep 2022 18:49:07 +0000 (18:49 +0000)]
Added a comment
yarikoptic [Wed, 21 Sep 2022 18:46:50 +0000 (18:46 +0000)]
Added a comment
Joey Hess [Wed, 21 Sep 2022 18:32:42 +0000 (14:32 -0400)]
comment and todo
Joey Hess [Wed, 21 Sep 2022 17:42:20 +0000 (13:42 -0400)]
comment
Joey Hess [Wed, 21 Sep 2022 17:17:21 +0000 (13:17 -0400)]
comment
Joey Hess [Wed, 21 Sep 2022 17:04:47 +0000 (13:04 -0400)]
comment
Joey Hess [Wed, 21 Sep 2022 14:41:12 +0000 (10:41 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Added a comment: "not inbackend=URL" is failed with parse error
Added a comment: "not inbackend=URL" is failed with parse error
yarikoptic [Tue, 20 Sep 2022 22:50:46 +0000 (22:50 +0000)]
Added a comment
yarikoptic [Tue, 20 Sep 2022 22:22:42 +0000 (22:22 +0000)]
initial report on odd "modified" status
Gus [Tue, 20 Sep 2022 22:07:30 +0000 (22:07 +0000)]
Added a comment
Added a comment
Joey Hess [Tue, 20 Sep 2022 18:55:34 +0000 (14:55 -0400)]
wording
Joey Hess [Tue, 20 Sep 2022 18:52:43 +0000 (14:52 -0400)]
skip checkRepoConfigInaccessible when git directory specified explicitly
Fix a reversion that prevented git-annex from working in a repository when
--git-dir or GIT_DIR is specified to relocate the git directory to
somewhere else. (Introduced in version 10.
20220525)
checkRepoConfigInaccessible could still run git config --list, just passing
--git-dir. It seems not necessary, because I know that passing --git-dir
bypasses git's check for repo ownership. I suppose it might be that git
eventually changes to check something about the ownership of the working
tree, so passing --git-dir without --work-tree would still be worth doing.
But for now this is the simple fix.
Sponsored-by: Nicholas Golder-Manning on Patreon
Joey Hess [Tue, 20 Sep 2022 18:16:15 +0000 (14:16 -0400)]
bug report rescued from forum
Joey Hess [Tue, 20 Sep 2022 18:06:09 +0000 (14:06 -0400)]
comment
Joey Hess [Tue, 20 Sep 2022 18:02:09 +0000 (14:02 -0400)]
comment
Joey Hess [Tue, 20 Sep 2022 17:54:34 +0000 (13:54 -0400)]
wontfix
Joey Hess [Tue, 20 Sep 2022 17:49:21 +0000 (13:49 -0400)]
comment
Joey Hess [Tue, 20 Sep 2022 17:35:47 +0000 (13:35 -0400)]
fixed
Joey Hess [Tue, 20 Sep 2022 17:33:57 +0000 (13:33 -0400)]
try retrieval from more than one export location when the first fails
Combined with commit
0ffc59d34107a3ee671b90fc7c59ca09c00abbf5, this
fixes the case where there are duplicate files on the special remote,
and the first gets modified/deleted, while the second is still present.
directory, adb: Fixed a bug when importtree=yes, and multiple files in the
special remote have the same content, that caused it to refuse to get a
file from the special remote, incorrectly complaining that it had changed,
due to only accepting the inode+mtime of one file (that was since modified
or deleted) and not accepting the inode+mtime of other duplicate files.
Sponsored-by: Max Thoursie on Patreon
Joey Hess [Tue, 20 Sep 2022 17:15:31 +0000 (13:15 -0400)]
change retrieveExportWithContentIdentifier to take a list of ContentIdentifier
This partly fixes an issue where there are duplicate files in the
special remote, and the first file gets swapped with another duplicate,
or deleted. The swap case is fixed by this, the deleted case will need
other changes.
This makes retrieveExportWithContentIdentifier take a list of allowed
ContentIdentifier, same as storeExportWithContentIdentifier,
removeExportWithContentIdentifier, and
checkPresentExportWithContentIdentifier.
Of the special remotes that support importtree, borg is a special case
and does not use content identifiers, S3 I assume can't get mixed up
like this, directory certainly has the problem, and adb also appears to
have had the problem.
Sponsored-by: Graham Spencer on Patreon
Joey Hess [Tue, 20 Sep 2022 16:56:16 +0000 (12:56 -0400)]
comment
Joey Hess [Tue, 20 Sep 2022 16:39:40 +0000 (12:39 -0400)]
comment
Joey Hess [Tue, 20 Sep 2022 16:20:33 +0000 (12:20 -0400)]
comment
nobodyinperson [Tue, 20 Sep 2022 12:11:03 +0000 (12:11 +0000)]
jgoerzen [Mon, 19 Sep 2022 14:49:02 +0000 (14:49 +0000)]
Added a comment
jgoerzen [Mon, 19 Sep 2022 13:55:07 +0000 (13:55 +0000)]
Added a comment
Gus [Mon, 19 Sep 2022 13:49:15 +0000 (13:49 +0000)]
Added a comment
Lukey [Mon, 19 Sep 2022 10:03:39 +0000 (10:03 +0000)]
Added a comment
Gus [Sun, 18 Sep 2022 12:21:07 +0000 (12:21 +0000)]
Gus [Sun, 18 Sep 2022 12:20:16 +0000 (12:20 +0000)]
eph@6377f195575d4a04abc70f20e0b00dffcc597d00 [Sat, 17 Sep 2022 21:19:13 +0000 (21:19 +0000)]
Added a comment
Joey Hess [Fri, 16 Sep 2022 18:11:25 +0000 (14:11 -0400)]
deal with ignoreinode config setting
Improve handling of directory special remotes with importtree=yes whose
ignoreinode setting has been changed. (By either enableremote or by
upgrading to commit
3e2f1f73cbc5fc10475745b3c3133267bd1850a7.)
When getting a file from such a remote, accept the content that would have
been accepted with the previous ignoreinode setting.
After a change to ignoreinode, importing a tree from the remote will
re-import and generate new content identifiers using the new config. So
when ignoreinode has changed to no, the inodes will be learned, and after
that point, a change in an inode will be detected as a change. Before
re-importing, a change in an inode will be ignored, as it was before the
ignoreinode change. This seems acceptble, because the user can re-import
immediately if they urgently need to add inodes. And if not, they'll
do it sometime, presumably, and the change will take effect then.
Sponsored-by: Erik Bjäreholt on Patreon
Joey Hess [Fri, 16 Sep 2022 17:40:27 +0000 (13:40 -0400)]
comments
Joey Hess [Fri, 16 Sep 2022 17:08:14 +0000 (13:08 -0400)]
comment